package com.gzq.prototype;

public class ShadowClone {
    public static void main(String[] args) throws CloneNotSupportedException {
        Gun gun = new Gun();
        Human human = new Human();
        human.setAge(18);
        human.setGun(gun);
        System.out.println(human.hashCode());
        System.out.println(human.getGun().hashCode());

        System.out.println("=======浅度克隆一个人========");

        Human clone = (Human) human.clone();
        System.out.println(clone.hashCode());
        System.out.println(clone.getGun().hashCode());

    }
}

